<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NeuZephyr: D:/Users/Mgepahmge/Documents/C Program/NeuZephyr/include/NeuZephyr/NeuZephyrCudaErrorHandling.cuh File Reference</title>
<link rel="icon" href="NZ_logo2.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="NZ_logo2.png"/></td>
  <td id="projectalign">
   <div id="projectname">NeuZephyr
   </div>
   <div id="projectbrief">Simple DL Framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_a7e6ee1ae3f772c9504a0b543f2027e2.html">Mgepahmge</a></li><li class="navelem"><a class="el" href="dir_e03f57e346cc4845a4c354a35630b169.html">Documents</a></li><li class="navelem"><a class="el" href="dir_231a0482af2b83c895f27ba7fe745141.html">C Program</a></li><li class="navelem"><a class="el" href="dir_0fa7fc3a0dfd304dbfc9dce9f6facfa2.html">NeuZephyr</a></li><li class="navelem"><a class="el" href="dir_e7295b03dab2e9cdf32139bd8ec2e607.html">include</a></li><li class="navelem"><a class="el" href="dir_657344ecc65cfc28732701509f8d8421.html">NeuZephyr</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">NeuZephyrCudaErrorHandling.cuh File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Definition of the Tensor class for GPU-based tensor operations.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdexcept&gt;</code><br />
<code>#include &lt;cstdio&gt;</code><br />
<code>#include &quot;dl_export.cuh&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for NeuZephyrCudaErrorHandling.cuh:</div>
<div class="dyncontent">
<div class="center"><img src="_neu_zephyr_cuda_error_handling_8cuh__incl.png" border="0" usemap="#a_d_1_2_users_2_mgepahmge_2_documents_2_c_01_program_2_neu_zephyr_2include_2_neu_zephyr_2_neu_zephyr_cuda_error_handling_8cuh" alt=""/></div>
<map name="a_d_1_2_users_2_mgepahmge_2_documents_2_c_01_program_2_neu_zephyr_2include_2_neu_zephyr_2_neu_zephyr_cuda_error_handling_8cuh" id="a_d_1_2_users_2_mgepahmge_2_documents_2_c_01_program_2_neu_zephyr_2include_2_neu_zephyr_2_neu_zephyr_cuda_error_handling_8cuh">
<area shape="rect" title="Definition of the Tensor class for GPU&#45;based tensor operations." alt="" coords="24,5,249,80"/>
<area shape="rect" title=" " alt="" coords="5,128,84,155"/>
<area shape="poly" title=" " alt="" coords="104,82,69,118,65,115,100,78"/>
<area shape="rect" title=" " alt="" coords="108,128,165,155"/>
<area shape="poly" title=" " alt="" coords="139,80,139,112,134,112,134,80"/>
<area shape="rect" href="dl__export_8cuh_source.html" title=" " alt="" coords="188,128,288,155"/>
<area shape="poly" title=" " alt="" coords="177,78,215,115,212,119,173,82"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_neu_zephyr_cuda_error_handling_8cuh__dep__incl.png" border="0" usemap="#a_d_1_2_users_2_mgepahmge_2_documents_2_c_01_program_2_neu_zephyr_2include_2_neu_zephyr_2_neu_zephyr_cuda_error_handling_8cuhdep" alt=""/></div>
<map name="a_d_1_2_users_2_mgepahmge_2_documents_2_c_01_program_2_neu_zephyr_2include_2_neu_zephyr_2_neu_zephyr_cuda_error_handling_8cuhdep" id="a_d_1_2_users_2_mgepahmge_2_documents_2_c_01_program_2_neu_zephyr_2include_2_neu_zephyr_2_neu_zephyr_cuda_error_handling_8cuhdep">
<area shape="rect" title="Definition of the Tensor class for GPU&#45;based tensor operations." alt="" coords="5,5,230,80"/>
<area shape="rect" href="_tensor_8cu_source.html" title=" " alt="" coords="31,128,204,187"/>
<area shape="poly" title=" " alt="" coords="120,95,120,127,115,127,115,95"/>
</map>
</div>
</div>
<p><a href="_neu_zephyr_cuda_error_handling_8cuh_source.html">Go to the source code of this file.</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Definition of the Tensor class for GPU-based tensor operations. </p>
<p>This file provides the declaration of the <code>Tensor</code> class, which is a key data structure for representing multidimensional arrays (tensors) in GPU memory. It supports mathematical operations, memory management, and utility functions for deep learning applications. The implementation leverages CUDA for high-performance computations.</p>
<p>The <code>Tensor</code> class encapsulates the following key features:</p><ul>
<li><b>Memory Management</b>: Efficient allocation and deallocation of GPU memory using <code>cudaMalloc</code> and <code>cudaMemcpy</code>.</li>
<li><b>Mathematical Operations</b>: Overloaded operators and utility functions for common tensor operations, including element-wise arithmetic, reshaping, and transposing.</li>
<li><b>Gradient Support</b>: Tracks gradients for tensors that require gradient computation, supporting backpropagation in neural networks.</li>
<li><b>Flexible Initialization</b>: Provides constructors for various initialization methods, including shape-based, iterator-based, and initializer-list-based creation.</li>
<li><b>Activation Functions</b>: Includes common activation functions such as ReLU, Sigmoid, Tanh, and advanced functions like Swish and HardSwish.</li>
</ul>
<p>This class is part of the <code><a class="el" href="namespacenz_1_1data.html" title="Contains data structures and utilities for tensor operations in machine learning workflows.">nz::data</a></code> namespace and is designed for extensibility and high performance in machine learning workflows.</p>
<dl class="section note"><dt>Note</dt><dd>Ensure proper error handling and memory cleanup when using this class to avoid GPU memory leaks or runtime errors.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge(<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/11/29 </dd></dl>

<p class="definition">Definition in file <a class="el" href="_neu_zephyr_cuda_error_handling_8cuh_source.html">NeuZephyrCudaErrorHandling.cuh</a>.</p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
